var Koa=require("koa");
var router=require("koa-router")();
var views=require("koa-views");
var nunjucks=require("nunjucks");
var app=new Koa();
app.use(views(__dirname+"/html",{
    map:{html:"nunjucks"}
}))
app.listen("3000",()=>{
    console.log("成功")
})
router.get("/",async ctx=>{
    var num=["小红","小绿","小紫"]
    await ctx.render("index",{
        num,
        denglu:true,
        haunying:"路人甲"

    })
})
app.use(router.routes())